package com.foreveross.fetl.application.impl;

import java.util.ArrayList;
import java.util.List;

import javax.inject.Inject;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.foreveross.fetl.application.IPlaneInfoApplication;
//import com.foreveross.fetl.common.InstanceFactory;
import com.foreveross.fetl.common.application.BaseApplicationImpl;
import com.foreveross.fetl.core.domain.freight.hbase.PlaneInfoEntity;
import com.foreveross.fetl.core.domain.freight.repository.IPlaneInfoRepository;

@Transactional
@Service("planeInfoApplication")
public class PlaneInfoApplicationImpl extends BaseApplicationImpl implements
		IPlaneInfoApplication {

	@Inject
	private IPlaneInfoRepository planeInfoRepository;
	@Override
	public List<PlaneInfoEntity> findByRowkey(List<String> startkeys,
			List<String> endkeys) {
		List<PlaneInfoEntity> data = new ArrayList<PlaneInfoEntity>();
		for (int i = 0; i < startkeys.size(); i++) {
			data.addAll(planeInfoRepository.findByRowkey(startkeys.get(i), endkeys.get(i)));
		}
		return data;
	}
	@Override
	public List<PlaneInfoEntity> findByRowkey(String startkey, String endkey) {
		return planeInfoRepository.findByRowkey(startkey, endkey);
	}

}
